import request from '../utils/request'

export const GetCompany = () => {
    return request('/api/chang_qin/company/tree/current')
  }
export const GetProblemList1 = (params) => {
    return request('/api/query_check_tree', {params})
  }

 export const GetProblemList2 = (params) => {
    return request(`/api/problemLists`,{
      params
    })
  }

export const DeleteProblem = (id) => { 
    return request(`/api/check_record/${id}`, {
      method: 'delete'
    })
  }

  export const GetDictionary = (params) => {
    return request('/api/dictionary', {
      params
    })
  }

  export const GetEmployee = (params) => {
    return request('/api/changqin_employee', {
      params
    })
  }
  
  export const GetSupervisor = () => {
    return request('/api/supervision_member', {
      
    })
  }

  export const GetSupervisor2 = () => {
    return request(`/api/queryUserByRoleCode/2008`)
  }

  export const GetProblemType = () => {
    return request('/api/hazard_factors')
  }

  //查询角色信息
  export const GetUserCode = () => {
    return request('/api/current_code')
  }

  //角色高权限
  export const GetAdminCode = () => {
    return request('/api/current_code_Admin')
  }

  //低权限
  export const GetCommonUserCode = () => {
    return request('/api/current_code_Headman')
  }


  export const GetCheckListItemNames = () => {
    return request('/api/query_checkitem')
  }


  export const GetcheckListItemDetailById = (id) => {
    return request(`/api/query_checkitem_byid/${id}`)
  }